<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left">
                        <button shiro:hasPermission="jzweb:itemBank:add" type="button" class="btn  btn-primary"
                                onclick="add()">
                            <i class="fa fa-plus" aria-hidden="true"></i>添加
                        </button>
                        <button shiro:hasPermission="jzweb:itemBank:batchRemove" type="button" class="btn  btn-danger"
                                onclick="batchRemove()">
                            <i class="fa fa-trash" aria-hidden="true"></i>删除
                        </button>
                        <button shiro:hasPermission="jzweb:itemBank:review" type="button" class="btn  btn-warning"
                                onclick="examine('/jzweb/itemBank')">
                            <i class="fa fa-check" aria-hidden="true"></i>审核
                        </button>
                        <button shiro:hasPermission="jzweb:itemBank:import" type="button" class="btn  btn-success"
                                onclick="downExcelModel('/jzweb/itemBank/downloadImportTemplate')">
                            <i class="fa fa-download" aria-hidden="true"></i>下载导入模板
                        </button>
                    </div>
                    <div class="columns pull-left" style="margin-left:4px">
                        <select shiro:hasPermission="jzweb:itemBank:import" id="cprofileId" class="form-control">
                            <option value="">请选择所属证书</option>
                            <option th:each="item : ${cprofileIds}"  th:value="${item.id}" th:text="${item.name}"></option>
                        </select>
                    </div>
                    <div class="columns pull-left form-group">
                        <select shiro:hasPermission="jzweb:itemBank:import" id="kpointsId" name="kpointsId" class="form-control">
                            <option value="">请选择知识点领域</option>
                        </select>
                    </div>
                    <div class="columns pull-left" style="margin-left:4px">
                        <form shiro:hasPermission="jzweb:itemBank:import" id="importExcelForm" method="post"
                              enctype="multipart/form-data">
                            <input class="form-control" style="width:200px" name="file" id="fileUrl" type="file">
                        </form>
                    </div>
                    <div class="columns pull-left" style="margin-left:4px">
                        <button shiro:hasPermission="jzweb:itemBank:import" type="button"
                                class="btn  btn-success"
                                onclick="importExcel1($('#fileUrl'),$('#importExcelForm'),$('#cprofileId').val(),$('#kpointsId').val(),'/jzweb/itemBank/import')">
                            <i class="fa fa-upload" aria-hidden="true"></i>导入
                        </button>
                    </div>
                </div>
            </div>
        </div>
            <div class="ibox">
                <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left col-md-1.5 nopadding">
                        <input id="kpointsName" type="text" class="form-control"
                               placeholder="请输入知识点领域">
                    </div>
                    <div class="columns pull-left col-md-1.5 nopadding">
                        <input id="profileName" type="text" class="form-control"
                               placeholder="请输入证书名称">
                    </div>
                    <div class="columns pull-left col-md-1.5 nopadding">
                        <input id="searchTopicContent" type="text" class="form-control"
                               placeholder="请输入题目内容">
                    </div>
                    <div class="columns pull-left  nopadding">
                        <select id="searchItemBankType" name="searchItemBankType" class="form-control">
                            <option value="">选择题库类型</option>
                            <option value="0">练习题</option>
                            <option value="1">考试题</option>
                        </select>
                    </div>
                    <div class="columns pull-left nopadding">
                        <select id="searchTopicTypes" name="searchTopicTypes" class="form-control">
                            <option value="">选择题目类型</option>
                            <option value="0">单选</option>
                            <option value="1">多选</option>
                            <option value="2">判断</option>
                            <option value="3">实操</option>
                        </select>
                    </div>
                    <div class="columns pull-left nopadding">
                        <select id="searchtype" name="searchtype" class="form-control">
                            <option value="">请选择类型</option>
                            <option value="0">理论</option>
                            <option value="1">技能</option>
                        </select>
                    </div>
                    <div class="columns pull-left nopadding">
                        <select id="searchstate" name="searchstate" class="form-control">
                            <option value="">请选择状态</option>
                            <option value="0">待审核</option>
                            <option value="1">已通过</option>
                            <option value="2">未通过</option>
                            <option value="9">已删除</option>
                        </select>
                    </div>
                    <div class="columns pull-left">
                        <button class="btn btn-success" onclick="reLoad()">查询</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 -->
<div>
    <script type="text/javascript">
        var s_edit_h = 'hidden';
        var s_remove_h = 'hidden';
        var s_resetPwd_h = 'hidden';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:edit">
    <script type="text/javascript">
        s_edit_h = '';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:remove">
    <script type="text/javascript">
        var s_remove_h = '';
    </script>
</div>
<div shiro:hasPermission="jzweb:itemBank:resetPwd">
    <script type="text/javascript">
        var s_resetPwd_h = '';
    </script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/webJs/jzweb/itemBank/itemBank.js"></script>
</body>
</html>